using System;

using Microsoft.SPOT;

using mfRCF.Core;

namespace OST.Commands
{
    using Extensions;
    using OST.Persistence;
    /// <summary>
    /// rcf-test-command, used in #DEBUG mode
    /// </summary>
    public class TestGETCommand : mfRcfCommand
    {
        #region CTOR
        public TestGETCommand(string httpPath)
            : base(httpPath, new mfGETMethod())
        {
            ContentTypeOut = "text/plain";
        } 
        #endregion


        #region mfRcfCommand
        public override void ExecuteCommand(mfIHttpContext httpContext)
        {
            try
            {
                //ConfigurationProvider.Instance.ConfigInstance.Motor.MoveDuration++;
                //ConfigurationProvider.Instance.SaveConfiguration();

                //write response
                this.WriteHttpResponseOK(httpContext, "all fine...");
            }
            catch (Exception ex)
            {
                this.WriteHttpResponseError(httpContext, ex);
            }
        } 
        #endregion
    }
}
